<template>
	<view>
		<u-popup :show="show" :customStyle="{width: '680rpx'}" mode="center" round="6">
			<view class="" style="position: relative; padding-top: 70rpx">
				<view class="title-box"></view>
				<view class="text-center margin-bt text-xl text-bold padding-top" v-if="title">
					{{title}}
				</view>
				<view class="padding text-lg text-center">
					{{content}}
				</view>
				<view class="flex align-center padding">
					<view class="flex-sub padding-lr">
						<u-button @click="close" type="primary" :text="cancelText" shape="circle" plain :color="color"></u-button>
					</view>
					<view class="flex-sub padding-lr">
						<u-button @click="determine" type="primary" :text="determineText" shape="circle" :color="color"></u-button>
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		props: {
			show: {
				type: Boolean,
				default: false,
			},
			content: {
				type: String,
				default: ''
			},
			cancelText: {
				type: String,
				default: '取消'
			},
			determineText: {
				type: String,
				default: '确认'
			},
			title:{
				type: String,
				default: ''
			},
			emitDetermine: {
				type: String,
				default: ''
			},
			color: {
				type: String,
				default: '#00b66c'
			}
		},
		onLoad() {

		},
		methods: {
			close() {
				uni.$emit('close')
			},
			determine(){
				uni.$emit(this.emitDetermine)
			}
		}
	}
</script>

<style lang="scss">
	.title-box{
		position: absolute;
		left: 50%;
		top: -85rpx;
		width:200rpx;
		height: 170rpx;
		margin-left: -100rpx;
		background-repeat: no-repeat;
		background-size: 200rpx 170rpx;
	}
</style>
